package light.mvc.model.wxn;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import light.mvc.model.base.IdEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "WXN_ACCESSTOKEN")
@DynamicInsert(true)
@DynamicUpdate(true)
public class AccessTokenBO extends IdEntity implements java.io.Serializable {
        private static final long serialVersionUID = -6528505879877926404L;
        @Column(name = "ACCESSTOKEN" ,columnDefinition="VARCHAR(1000)")
        private String access_Token; //Access_Token
        
        @Column(name = "EXPIRES_IN" , length=0)
        private int expires_in; //凭证有效时间，单位：秒
        
        @Column(name = "EXPIRES_TIME" , length=0)
        private Date expiresTime; //创建时间
        
        @Column(name = "APPID" , length=50)
        private String appid; //
        
        @Column(name = "SECRET" , length=200)
        private String secret; //
        
        @Column(name = "WEI_ID" , length=50 ,nullable = true )
        private String weiId; //微信公众帐号
        
        @Column(name = "WEI_NAME" , length=50 ,nullable = true )
        private String weiName; //微信公众名称
        
        
        public AccessTokenBO(){
        }

        public AccessTokenBO(String access_Token,int expires_in,Date expiresTime,String appid,String secret,String weiName){
                this.access_Token=access_Token;
                this.expires_in=expires_in;
                this.expiresTime=expiresTime;
                this.appid=appid;
                this.secret=secret;
                this.weiName=weiName;
        }
        

        public String getWeiName() {
			return weiName;
		}

		public void setWeiName(String weiName) {
			this.weiName = weiName;
		}

		public String getAccess_Token() {
                return  access_Token;
        }

        public void setAccess_Token(String access_Token) {
                this.access_Token = access_Token;
        }

        public int getExpires_in() {
                return  expires_in;
        }

        public void setExpires_in(int expires_in) {
                this.expires_in = expires_in;
        }

        public Date getExpiresTime() {
                return  expiresTime;
        }

        public void setExpiresTime(Date expiresTime) {
                this.expiresTime = expiresTime;
        }

        public String getAppid() {
                return  appid;
        }

        public void setAppid(String appid) {
                this.appid = appid;
        }

        public String getSecret() {
                return  secret;
        }

        public void setSecret(String secret) {
                this.secret = secret;
        }

		public String getWeiId() {
			return weiId;
		}

		public void setWeiId(String weiId) {
			this.weiId = weiId;
		}
	
		

}
